<template>
  <van-swipe :autoplay="3000">
    <van-swipe-item v-for="(value, index) in banner" :key="index">
      <a :href="value.link"> <img :src="value.image"/></a>
    </van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  name: "HomeSwiper",
  props: {
    banner: {
      type: Array,
      default() {
        return [];
      }
    }
  }
};
</script>

<style lang="less" scoped>
.van-swipe{
  a{
    display: block;
    img{
      width: 100%;
    }
  }
}
</style>
